<template>
	<view>
		<view class="need-box" v-for="(item,index) in needList">
			<needcard shrink @shrinkTypeChange="shrinkTypeChange" :shrinkType="item" :index="index"></needcard>
			<needcard v-if="item" position="inside"></needcard>
			<needcard v-if="item" shrink position="inside"></needcard>
		</view>
		
	</view>
</template>

<script>
	import needcard from '../card/needcard.vue';
	export default {
		components:{
			needcard
		},
		data() {
			return {
				needList:[true,false,false]
			}
		},
		methods: {
			shrinkTypeChange:function(index){
				let needList = this.needList;
				this.$set(this.needList,index,!needList[index]);
			},
		}
	}
</script>

<style lang="scss" scoped>
	.need-box{
		background-color: white;
		
	}
</style>
